package cn.trasen.his.poc.std.api.model.drug;

import cn.trasen.his.poc.std.api.model.major.DeptInfo;
import cn.trasen.his.poc.std.api.model.major.OrgInfo;
import pro.shushi.pamirs.meta.annotation.Field;
import pro.shushi.pamirs.meta.annotation.Model;
import pro.shushi.pamirs.meta.base.IdModel;

/**
 * @Description: 药品库存
 * @author: Jacob
 * @Date: 2024-11-29 16:47:02
 * @Company: 湖南创星科技股份有限公司
 */
@Model.model(DrugStock.MODEL_MODEL)
@Model(displayName = "药品库存", labelFields = "name")
public class DrugStock extends IdModel {

    public static final String MODEL_MODEL = "ts.his.DrugStock";

    @Field.many2one
    @Field.Relation(relationFields = {"orgCode"}, referenceFields = {"code"})
    @Field(displayName = "机构", required = true)
    private OrgInfo org;

    @Field.String
    @Field(displayName = "机构代码", invisible = true)
    private String orgCode;

    @Field.Integer
    @Field(displayName = "药房ID", invisible = true)
    private Long deptId;

    @Field.many2one
    @Field.Relation(relationFields = {"deptId"}, referenceFields = {"id"}, domain = "deptType =='YAO_FANG'")
    @Field(displayName = "药房名称", required = true)
    private DeptInfo drugRoomName;

    @Field.Integer
    @Field(displayName = "药品ID",invisible = true)
    private Long drugId;

    @Field.many2one
    @Field.Relation(relationFields = {"drugId"}, referenceFields = {"id"})
    @Field(displayName = "药品名称", required = true)
    private DrugDictionary drugDictionary;

    @Field.Float
    @Field(displayName = "库存量")
    private Double stockNum;

}
